X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7688c6ba71852cd89123b62b2d57683535e4702a..53a5df18dd17a11c18781e78349feb3e139096b4:/wp-admin/setup-config.php?step=1%3C%3Fphp%20if%20%28%20isset%28%20%24_GET%5B%27noapi%27%5D%20%29%20%29%20echo%20%27;noapi%27=;%20%3F%3E= diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index b4dae209..d8ae3560 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -1,203 +1,307 @@ The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.
"); +// Check for the required PHP version and for the MySQL extension or a database drop-in. +wp_check_php_mysql_versions(); + +require_once(ABSPATH . WPINC . '/functions.php'); + +// Also loads plugin.php, l10n.php, pomo/mo.php (all required by setup-config.php) +wp_load_translations_early(); + +// Turn register_globals off. +wp_unregister_GLOBALS(); + +// Standardize $_SERVER variables across setups. +wp_fix_server_vars(); + +require_once(ABSPATH . WPINC . '/compat.php'); +require_once(ABSPATH . WPINC . '/class-wp-error.php'); +require_once(ABSPATH . WPINC . '/formatting.php'); -if (isset($_GET['step'])) - $step = $_GET['step']; +// Add magic quotes and set up $_REQUEST ( $_GET + $_POST ) +wp_magic_quotes(); + +// Support wp-config-sample.php one level up, for the develop repo. +if ( file_exists( ABSPATH . 'wp-config-sample.php' ) ) + $config_file = file( ABSPATH . 'wp-config-sample.php' ); +elseif ( file_exists( dirname( ABSPATH ) . '/wp-config-sample.php' ) ) + $config_file = file( dirname( ABSPATH ) . '/wp-config-sample.php' ); else - $step = 0; + wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.' ) ); + +// Check if wp-config.php has been created +if ( file_exists( ABSPATH . 'wp-config.php' ) ) + wp_die( '' . sprintf( __( "The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now." ), 'install.php' ) . '
' ); + +// Check if wp-config.php exists above the root directory but is not part of another install +if ( file_exists(ABSPATH . '../wp-config.php' ) && ! file_exists( ABSPATH . '../wp-settings.php' ) ) + wp_die( '' . sprintf( __( "The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now."), 'install.php' ) . '
' ); + +$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; + +/** + * Display setup wp-config.php file header. + * + * @ignore + * @since 2.3.0 + * @package WordPress + * @subpackage Installer_WP_Config + */ +function setup_config_display_header() { + global $wp_version; -function display_header(){ header( 'Content-Type: text/html; charset=utf-8' ); ?> - - + +> -Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.
+If for any reason this automatic file creation doesn't work, don't worry. All this does is fill in the database information to a configuration file. You may also simply open wp-config-sample.php
in a text editor, fill in your information, and save it as wp-config.php
.
In all likelihood, these items were supplied to you by your ISP. If you do not have this information, then you will need to contact them before you can continue. If you’re all ready, let’s go!
+wp-config-sample.php in a text editor, fill in your information, and save it as wp-config.php
." ); ?>